package com.ruoyi.system.entity;

import java.util.Arrays;
import java.util.List;

public class CommonConstants {


    //库索引前缀
    public static final String INDEX_PREFIX = "by_senior";
    //碎片化索引前缀
    public static final String FRAG_PREFIX = "by_node_";
    //参考文献库代码--固定配置
    public static final String REFERENCE = "systemreference";
    //符合性审查库代码--固定配置
    public static final String REVIEW = "systemreview";
    //法律法规库代码--固定配置
    public static final String LAW = "systemlaw";


    //章节字段前缀
    public static final String SECTION_PREFIX = "section_";
    //目录字段前缀
    public static final String CATA_PREFIX = "cata_";
    //表格字段前缀
    public static final String TABLE_PREFIX = "table_";
    //导航搜索字段后缀
    public static final String _NAV = "_nav";


    //导航搜索 作者
    public static final String AUTHOR = "author";
    //导航搜索 发表时间
    public static final String PUBLISHTIME = "publish_time";
    //导航搜索 知识体系
    public static final String CLASSSYSTEM = "class_system";

    //搜索的公共字段
    public static List<String> searchField = Arrays.asList("a100", "a298");


    //导入文档使用的分布式锁key
    public static final String IMPORT_LIBRARY_KEY = "lock:knowledgelibrary";
    //库容量前缀
    public static final String NUM_DATABASE = "num:search:database:";
    //作者容量前缀
    public static final String NUM_AUTHOR = "num:search:author:";
    //分类体系容量前缀
    public static final String NUM_CLASSSYSTEM = "num:search:classsystem:";
    //发表时间容量前缀
    public static final String NUM_PUBLISH = "num:search:publishtime:";


    //用户行为--搜索
    public static final Integer BEHAVIOR_SEARCH = 1;
    //用户行为--收藏
    public static final Integer BEHAVIOR_COLLECT = 2;
    //用户行为--下载
    public static final Integer BEHAVIOR_DOWNLOAD = 3;
    //用户行为--浏览
    public static final Integer BEHAVIOR_BROWSE = 4;


    //全文搜索字段
    public static final String FULLTEXT = "full_text";

    //关键词搜索字段
    public static final String KEYWORD = "keyword";

    /*碎片化标识位*/
    //待碎片化
    public static final String FRAGE_INI = "-1";
    //碎片化成功
    public static final String FRAGE_YES = "0";
    //未碎片化
    public static final String FRAGE_NO = "1";
    //碎片化进行中
    public static final String FRAGE_ING = "2";
    //碎片化失败
    public static final String FRAGE_FAIL = "3";
}
